﻿using Quartz;
using System;
using System.Diagnostics;
using System.Threading.Tasks;

namespace OSMonitor.App.Core
{
    public class TimeJob : IJob
    {
        public Task Execute(IJobExecutionContext context)
        {
            return Task.Run(() =>
            {
                //Console.WriteLine("Execute to shutdown computer.");
                Process.Start("shutdown", "/s /t 180");
                QuartzExtension.Executed = true;
                QuartzExtension.SetExecuted();
            });
        }
    }
}
